<template>
	<view class="box">
		<view class="top">
			<u-navbar :is-back="false" title="官网" :border-bottom="false" :background="background"></u-navbar>
		</view>
		<scroll-view scroll-y class="scroll">
			<view class="video-player" v-if="videoSrc">
				<video id="myVideo" :enable-progress-gesture="false" class="video" :src="videoSrc" :poster="posterSrc"
					:muted="muted" loop autoplay show-mute-btn controls></video>
			</view>
			<view class="container_br">
				<view class="top jsbc">
					<view class="left flc">
						<u-icon :name="'/static/icon/logo.png'" size="40"></u-icon>
						<span class="ml2 name">公司简介</span>
					</view>
					<view class="right flc" @click="goPage('/page/introduce/introduce')">
						<span class="mr2 name">查看更多</span>
						<u-icon name="arrow-right" size="26" color="#dedede"></u-icon>
					</view>
				</view>
				<view class="line mtb2" style="height: 2rpx; width: 670rpx; background-color: #dedede;">
				</view>
				<view class="ubg" style="min-height: 500rpx;">
					<image
						style="width: 100%;background:url(https://img.js.design/assets/img/636cfa22e2e0e5d0b224cdfc.jpg#7c98f63261630120c5c689c1c6a7240d) no-repeat;border-radius: 10rpx;"
						:src="cover" mode="widthFix"></image>
				</view>
				<view class="card-content">
					<rich-text :nodes="src"></rich-text>
				</view>
			</view>
			<view class="container_br">
				<view class="top flc">
					<u-icon :name="'/static/icon/logo.png'" size="40"></u-icon>
					<span class="ml2 name">照片墙</span>
				</view>
				<view class="line mtb2" style="height: 2rpx; width: 670rpx; background-color: #dedede;">
				</view>
				<view class="item" v-for="(item,index) in content" :key="index">
					<view class="img">
						<image :src="item" mode="widthFix" style="width: 670rpx;"></image>
					</view>
				</view>
			</view>
		</scroll-view>

	</view>
</template>
<script>
	import {
		getBlumn,getIntro
	} from '@/api/index.js'
	import {
		closeload,
		tiao, toastload
	} from '@/utils/common.js'
	import baseUrl from '@/config/config.js'
	export default {
		data() {
			return {
				background: {
					backgroundColor: '#eef2f5'
				},
				cover: '/static/img/title.png',
				posterSrc: "https://mp-35ab61e2-32f4-47fa-aee5-ee9b5616a493.cdn.bspapp.com/cloudstorage/40dc0037-21a7-49f1-b0d4-82181b725f67.png",
				videoSrc: "https://mp-35ab61e2-32f4-47fa-aee5-ee9b5616a493.cdn.bspapp.com/cloudstorage/e103b71c-f870-4434-b8eb-5d2e8f232062.mp4",
				content:'',
				src:""

			}
		},

		onLoad(res) {
			console.log("邀请码",res);
			this.init()
		},

		methods: {
			init() {
				toastload()
				getBlumn().then(res=>{
					console.log(res);
					closeload()
					this.content = res.data
				})
				getIntro().then(res => {
					closeload()
					console.log(res);
					this.src = res.data
				})
			},
			goPage(url) {
				tiao(url)
			}
		}
	}
</script>
<style lang="scss" scoped>
	.box {
		background: url(https://mp-35ab61e2-32f4-47fa-aee5-ee9b5616a493.cdn.bspapp.com/VKCEYUGU-35ab61e2-32f4-47fa-aee5-ee9b5616a493/a51ae2d4-3a22-47cf-a352-02d8c54037b1.jpg);
		background-size: contain;
		width: 100vw;
		position: relative;
		top: 0;
		left: 0;
	}

	.video-player {
		width: 94%;
		height: 225px;
		margin: 15rpx auto;
		border-radius: 10rpx;
		overflow: hidden;
		box-shadow: 4rpx 4rpx 15rpx #909399;

		.video {
			width: 100%;
			height: 100%;
		}
	}
</style>